home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / filec.arc / FILEC.DOC < prev    next >
Encoding:
Text File  |  1987-10-03  |  9.6 KB  |  254 lines

  1.                         FILEC Version 1.00
  2.                          By Mike Morearty
  3.  
  4.  
  5.  
  6. INTRODUCTION
  7. ------------
  8.  
  9. FILEC stands  for  Filename  Completion.  This  program  provides
  10. filename completion similar to that done by some versions of  the
  11. Unix C Shell (also called "Tenex-style" completion).
  12.  
  13. The purpose of filename completion is so that  the  user  doesn't
  14. have  to  type  in  long  filenames when the first few characters
  15. would be enough to distinguish a filename from all other files in
  16. the directory.  For example,  suppose a directory  contains  only
  17. the following files:
  18.  
  19.      A         B         C         LONGFILE.NAM
  20.  
  21. To access LONGFILE.NAM (for example, to see its contents with the
  22. TYPE command), the user normally has to type the entire filename.
  23. However, with filename completion, the user need only enter
  24.  
  25.      TYPE L_
  26.  
  27. and then hit  the  Escape  key.  (The  underline  represents  the
  28. cursor.)  Since  there is only one filename in the directory that
  29. begins with the letter L,  the rest of the filename is filled  in
  30. automatically,  as  if  the user had typed it.  Now,  the command
  31. lines reads
  32.  
  33.      TYPE LONGFILE.NAM_
  34.  
  35. and the user can hit Enter.
  36.  
  37.  
  38.  
  39. STARTING FILEC
  40. --------------
  41.  
  42. To install Filec,  just type FILEC and press Enter.  The  program
  43. will  print  the version number and say that it is now installed.
  44. If the program was already installed,  it will say so.  Note that
  45. the message can be suppressed by redirecting the  output  to  the
  46. null device, i.e.
  47.  
  48.      FILEC >NUL
  49.  
  50. You may want to put this line in your  AUTOEXEC.BAT  file.  Also,
  51. note  that if you are using the public domain Ced program,  Filec
  52. must be installed AFTER Ced is installed.
  53.  
  54. To change the keys used to invoke Filec, read the "Configuration"
  55. section below.
  56.  
  57.  
  58.  
  59. TOO FEW OR TOO MANY MATCHING FILES
  60. ----------------------------------
  61.  
  62. As described in the Introduction,  the  Escape  key  is  used  to
  63. complete the filename of which the first few characters have been
  64. typed.  What  if there is more than one filename that begins with
  65. the characters that have  been  typed?  In  that  case,  as  many
  66. characters  as  possible  are filled in on the command line,  and
  67. then a short beep is emitted.  For example, if in addition to the
  68. files in the original example (A, B, C, and LONGFILE.NAM),  there
  69. is  also  a  file  LONGNAME in the current directory,  then after
  70. typing  "TYPE  L"  and  pressing Escape the command line would be
  71. filled in with
  72.  
  73.      TYPE LONG_
  74.  
  75. and then FILEC would emit a short beep to let  you  know  that  a
  76. complete filename had not been filled in.  A beep is also emitted
  77. if no files match the characters that have been typed.
  78.  
  79.  
  80.  
  81. THE DIRECTORY KEY, ^D
  82. ---------------------
  83.  
  84. Sometimes you have begun typing  a  long  command,  and  you  hit
  85. Escape  only  to be greeted by a beep.  This either means that no
  86. files match the characters typed so far,  or that more  than  one
  87. file matches (see above section).  If you want to get a  list  of
  88. files  that  match the characters typed so far,  you can do so at
  89. any time by typing ^D (control-D).  A list of the matching  files
  90. will  be  displayed,  and  then the command line will be redrawn.
  91. (Note that if you have CED  installed  and  you  backspace  after
  92. getting  a  directory,  you  may  get  some funny behavior on the
  93. screen; there is no way to avoid this, but no harm is done.)
  94.  
  95. Using the example in the above section, the screen shows
  96.  
  97.      A>TYPE L_
  98.  
  99. and you hit Escape.  Now the screen shows
  100.  
  101.      A>TYPE LONG_
  102.  
  103. and a beep has sounded.  Now you hit ^D.  The screen now shows
  104.  
  105.      A>TYPE LONG
  106.      LONGFILE.NAM    LONGNAME
  107.      A>TYPE LONG_
  108.  
  109. You  can now hit an F or an N and then hit Escape again,  and the
  110. appropriate filename will be filled in.
  111.  
  112.  
  113.  
  114. THE DISABLE KEY, ALT-F10
  115. ------------------------
  116.  
  117. Suppose you bring up SideKick with Ctrl-Alt (or any other memory-
  118. resident  program),  and  then when you are done using it and hit
  119. Escape,  all you get is a beep.  This means  that  FILEC  doesn't
  120. know you are not at the DOS prompt,  so it is trying  to  find  a
  121. filename at the cursor position but doesn't see one.  To get back
  122. to  the system prompt,  type ALT-F10,  and then hit Escape again.
  123. ALT-F10 temporarily disables  any  filename  completion.  If  you
  124. want  to  re-enable  filename  completion,  type ALT-F10 a second
  125. time.
  126.  
  127. Note  that  filename  completion is automatically turned on again
  128. after you hit Return, so ALT-F10 only affects the current line of
  129. input.
  130.  
  131. To avoid conflicts with programs such as SideKick, you can change
  132. FILEC's filename completion keys.  See "Installation."
  133.  
  134.  
  135.  
  136. IGNORING CERTAIN EXTENSIONS
  137. ---------------------------
  138.  
  139. There are certain filenames that you seldom  access  directly  on
  140. the  command  line,  and  these are almost always recognizable by
  141. their extension.  For example,  files that end in .BAK are almost
  142. never  accessed  (because  they  are backup files).  You may have
  143. several files  in  a  directory  with  the  same  base  name  but
  144. different extensions;  for example,  if you are a programmer, you
  145. may have FILE.C,  FILE.BAK,  FILE.OBJ,  and FILE.EXE all the same
  146. directory.  In this case,  FILE.C is the only one whose name  you
  147. type frequently.
  148.  
  149. To get around this difficulty,  FILEC ignores filenames that have
  150. certain extensions.  All files that have the extension EXE,  COM,
  151. BAK,  OBJ,  or  $$$  are  ignored  when  looking  for  a matching
  152. filename.
  153.  
  154. There is an exception: if, for example, FILE.EXE is the ONLY file
  155. that matches the letters typed, then that filename will be filled
  156. in, even though it has one of the disallowed extensions.
  157.  
  158. Also,  you  can  easily  change  the  list of extensions that are
  159. ignored.   To  do  this,   BEFORE  installing  FILEC,   set   the
  160. environment variable FIGNORE.  For example:
  161.  
  162.      SET FIGNORE=.exe .com .bak .ovr .hex
  163.  
  164. Upper  and  lower case distinctions are not important.  Wildcards
  165. are not allowed.
  166.  
  167.  
  168.  
  169. CONFIGURATION
  170. -------------
  171.  
  172. If  your version of DOS does not erase the line when you type ^U,
  173. you should definitely read this section.  Others may want to read
  174. it as well.
  175.  
  176. You may, for some reason,  want to change the keystrokes that are
  177. used  to  invoke  Filec.  For  example,  the  default  keystrokes
  178. (Escape and ^D) might conflict with a memory-resident program you
  179. use, or with DOS itself.  (Normally, Escape cancels the text that
  180. has been entered so far on the DOS command line.)
  181.  
  182. To change these defaults,  you can use the configuration program,
  183. FILECKEY.   (Just   type   "Fileckey";   the   program  is  self-
  184. explanatory.) Not only will this program allow you to change  the
  185. Filename  Completion  key (normally Escape) and the Directory key
  186. (normally ^D),  but it will also let you assign a  "Change  From"
  187. key and a "Change To" key.  For example, you can assign ^U to the
  188. "Change  From"  key,  and  Escape  to the "Change To" key.  Then,
  189. whenever you type ^U at the command  line,  DOS  will  think  you
  190. typed  Escape.  This  is useful if your version of DOS recognizes
  191. no key other than Escape to erase the currently entered text, and
  192. yet you want to use Escape for Filec.
  193.  
  194. Note that this key translation will only be done  while  you  are
  195. typing  on  the  command line -- it will not be done when you are
  196. running  a  program.  Also,  you  could  theoretically  use  this
  197. feature  for some other purpose than assigning a cancel-line key.
  198.  
  199. You  can  also specify a "Disable" key with the FILECKEY program.
  200. This key, which is ALT-F10 by default,  allows you to temporarily
  201. disable  filename completion.  This may be necessary when certain
  202. pop-up programs are run which use the same keys that  FILEC  uses
  203. (such as recent versions of SideKick;  older versions do not have
  204. this problem).  A better solution,  if there is a program you use
  205. frequently which conflicts with FILEC, is to change the FILEC key
  206. assignments  so  that they do not conflict.  One good possibility
  207. is  to  assign  Tab  to  the  Replace  key  and  Shift-Tab to the
  208. Directory key.  Or you could make F1 the Replace key and  F2  the
  209. directory key, although these choices probably conflict with many
  210. pop-up programs.
  211.  
  212.  
  213.  
  214. OTHER CONSIDERATIONS
  215. --------------------
  216.  
  217. To  find  out  what  characters the user has typed so far,  Filec
  218. reads the screen  directly.  This  means  it  will  not  work  on
  219. computers  that  do not use a video memory system similar to that
  220. of the IBM. (This will be a problem for very few users.) Also, it
  221. starts at the character immediately before the cursor  and  moves
  222. back  from there until it reaches a character that is not allowed
  223. in filenames;  therefore, if the user types, for example,  "CD\",
  224. and then hits Escape, Filec will beep, because it will be looking
  225. for a  subdirectory  named  "CD".  Instead  the  user  must  type
  226. "CD \".
  227.  
  228. If you have a subdirectory called  \SUBDIR,  and  you  type,  for
  229. example,  "TYPE \SUBDIR" and then hit ^D, hoping to get a list of
  230. filenames in that directory,  only the name of  the  subdirectory
  231. itself  will  be  displayed.  You  must  add another backslash --
  232. i.e., "TYPE \SUBDIR\" -- in order to get a list of filenames.
  233.  
  234. On color monitors,  this program may sometimes  produce  a  small
  235. amount of "snow." While it is possible to program around this,  I
  236. don't usually have access to a color system.  Hopefully this will
  237. be fixed in a later version.
  238.  
  239.  
  240.  
  241. THE AUTHOR
  242. ----------
  243.  
  244. Mike Morearty is currently (through June 1988)  a  senior  at  UC
  245. Berkeley,  getting his bachelor's degree in Computer Science.  He
  246. can be reached at:
  247.  
  248.      83 Corte Mesa Drive
  249.      San Rafael, CA 94901
  250.  
  251. Electronic address:
  252.  
  253.      morearty@cory.Berkeley.EDU (or ucbvax!cory!morearty)
  254.